package operations;

import computer.Memory;
import computer.Operand;
import computer.ProgramCounter;

public class Print implements Operation {
	private Operand o1;
	
	public Print(Operand o1) {
		this.o1 = o1;
	}

	public void execute(Memory memory, ProgramCounter programCounter) {
		System.out.println(o1.getValue(memory).toString());
		programCounter.increase();
	}
	
	public String toString() {
		return "PRT " + o1.toString();
	}
}
